package com.cimcitech.base_utils_class.module

import com.ken.requestlibrey.request.NetApi
import dagger.Module
import dagger.Provides
import okhttp3.OkHttpClient
import javax.inject.Singleton

/**
 * @author by ken
 * Blog:
 * Date:2019/12/25
 * Description:
 */
/**
 * 网络模块依赖注入
 */
@Module
class NetModule {
   /* @Provides
    @Singleton
    fun netClient(): NetApi {
        val okHttpClient = OkHttpClient.Builder()
            .addInterceptor(ParametersInterceptor())
            .addInterceptor(LogInterceptor())
            .build()
        val retrofit = Retrofit.Builder()
            .baseUrl(UrlDefinition.BASE_URL)
            .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
            .addConverterFactory(GsonConverterFactory.create())
            .client(okHttpClient)
            .build()
        return retrofit.create(NetApi::class.java)
    }*/
}